from apicore.SendRequest import sendRequest
from conf.Readini import readIni

r = readIni()
host = r.get_ip_port()


class loginApi(sendRequest):

    def login(self, id, pwd):
        uri = '/api/front/login'
        data = {
            "account": id,
            "password": pwd
        }
        # 使用继承的 send_request 方法发送请求
        response = self.send_request('POST', uri, {}, json=data)
        return response

